//go:build !edge
// +build !edge

package routes

import (
	"github.com/gin-gonic/gin"
	"iot-base/auth/api/handler/task"
	"iot-base/auth/api/handler/thing"
)

func addCaliRoute(g *gin.RouterGroup) {
	g.POST("/cali/zero", thing.CmdZero)
	g.POST("/cali/span", thing.CmdSpan)
	g.GET("/caliStatus", thing.CmdGetStatus)
	g.GET("/resetStatus", thing.CmdClearStatus)
	g.POST("/caliTask", thing.CmdCaliTask)
	g.POST("/caliTaskStop", thing.CmdStopCaliTask)
	g.GET("/caliTaskStatus", thing.CmdQueryCaliTaskStatus)
}

func addTaskRoute(g *gin.RouterGroup) {
	taskRoute := g.Group("task")
	{
		taskRoute.POST("/add", task.CmdAddTask)
		taskRoute.POST("/del", task.Del)
		taskRoute.POST("/modify", task.Modify)
		taskRoute.GET("/list", task.List)
		taskRoute.GET("/log", task.FindTaskLog)
		taskRoute.GET("/logDetails", task.LogDetails) //日志详情
	}
}
